import { defineStore } from 'pinia';

//背景视频地址


export const useThemeStore = defineStore('SysTheme', {
  state: () => ({
    theme: 'light',
    backVideoUrl: 'lightVideoUrl',
  }),
  actions: {
    /**
     * 修改主题
     * @param {'dark'|'light'} time
     */
    async modifyTopic(time: string) {
      this.theme = time;
      this.backVideoUrl = time === 'light' ? 'lightVideoUrl' : 'darkVideoUrl';
      console.log('修改了主题', this.theme);
    },
  },
  persist: true,
});
